/*
 * GameState.java
 * 
 *  author: Daniel Rudigier
 *    date: 18.11.2008
 * 
 */

package at.syncme.framework;

/**
 * represents the state of all game objects and also holds the current
 * global virtual time.  
 * 
 * @author Daniel Rudigier
 */
public abstract class GameState extends Entity {
    private long gvt;

    /**
     * @return gvt
     */
    public long getGvt() {
        return gvt;
    }
    
    /**
     * @param gvt to set
     */
    public void setGvt(long gvt) {
        this.gvt = gvt;
    }

    /**
     * update the game
     */
    public abstract void updateGame();
    
    /**
     * be a little bit lazy 
     * 
     * @param lazy
     */
    protected void beLazy(long lazy) {
        try {
            Thread.sleep(lazy);
        } catch (InterruptedException e) {
            // don't care
        }
    }

}
